insert overwrite table jms_data_check.oms_waybill_check_ml_dt partition(dt)
select
sum(if(receiver_province_name is null,1,0)) receiver_province_name_null_cnt,
sum(if(receiver_province_id is null,1,0)) receiver_province_id_null_cnt,
sum(if(receiver_city_name is null,1,0)) receiver_city_name_null_cnt,
sum(if(receiver_city_id is null,1,0)) receiver_city_id_null_cnt,
sum(if(receiver_area_name is null,1,0)) receiver_area_name_null_cnt,
sum(if(receiver_area_id is null,1,0)) receiver_area_id_null_cnt,
sum(if(receiver_detailed_address is null,1,0)) receiver_detailed_address_null_cnt,
count(1) cnt,
'{{ execution_date | cst_ds }}' as dt
from jms_ods.yl_oms_oms_waybill where dt = '{{ execution_date | cst_ds }}'
and instr(SIGN_NETWORK_NAME,'退转') =0
and is_sign=1
and sign_finance_code not in ('888888','Test001','Test0001','testzxn003','testzxn001')
and instr(SIGN_FINANCE_NAME,'测试') =0
and sign_finance_code not rlike '[A-Za-z]+'
and is_abnormal=0
and is_void=0
and is_refund=0
and sign_network_code is not null ;